package cn.hy.interceptor;


import cn.hy.dto.UserDto;

public class UserContext {

    private static ThreadLocal<UserDto> userHolder = new ThreadLocal<UserDto>();

    public static UserDto getUser() {

        return userHolder.get();
    }

    public static void setUser(UserDto user) {
        userHolder.set(user);
    }

    public static void removeUser() {
        userHolder.remove();
    }

}
